package com.yc.bbs.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.bbs.entity.Link;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 友情链接表 Mapper 接口
 * </p>
 *
 * @author k
 * @since 2024-12-06
 */
public interface LinkMapper extends BaseMapper<Link> {

    @Select("select lid, name, link from tbl_link where state = 0 and (end_time is null or end_time >= now())")
    List<Link> selectLinks();
}
